package com.qianli.cashmama.trade.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.qianli.cashmama.trade.dao.TBillRepaymentDetailDao;
import com.qianli.cashmama.trade.entity.TBillRepaymentDetailEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: sm
 * Date: 2017-07-21
 * Time: 09:10:21.134
 */

@Repository
public class TBillRepaymentDetailDaoImpl extends AbstractBaseMapper<TBillRepaymentDetailEntity> implements TBillRepaymentDetailDao {

    @Override
    public List<TBillRepaymentDetailEntity> selectByBillNos(List<String> billNos) {
        Map<String, Object> map = new HashMap<>();
        map.put("billNos", billNos);
        return getSqlSession().selectList(getStatement("selectByBillNos"), map);
    }

    @Override
    public List<TBillRepaymentDetailEntity> selectByTradeNos(List<String> tradeNos) {
        Map<String, Object> map = new HashMap<>();
        map.put("tradeNos", tradeNos);
        return getSqlSession().selectList(getStatement("selectByTradeNos"), map);
    }

    @Override
    public TBillRepaymentDetailEntity selectByBizNo(String bizNo) {
        Map<String, Object> map = new HashMap<>();
        map.put("bizNo", bizNo);
        return getSqlSession().selectOne(getStatement("selectByBizNo"), map);
    }

    /**
     * @param payBizNo
     * @return
     */
    @Override
    public TBillRepaymentDetailEntity selectByPayBizNo(String payBizNo) {
        Map<String, Object> map = new HashMap<>();
        map.put("payBizNo", payBizNo);
        return getSqlSession().selectOne(getStatement("selectByPayBizNo"), map);
    }
}